<!DOCTYPE html>
<html>
<div class="layui-container fly-marginTop fly-user-main">
    {include file='common/menu'/}

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>


    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-col-md8">
            <div class="fly-panel" style="margin-bottom: 0;">
                <div class="fly-panel-title fly-filter">
                    <a href="{:url('/home/user/mypost')}" class="{$state == '' ? 'layui-this' : ''}">综合</a>
                    <span class="fly-mid"></span>
                    <a href="{:url('/home/user/mypost',['state' => 1])}"
                        class="{$state === '1' ? 'layui-this' : ''}">置顶</a>
                    <span class="fly-mid"></span>
                    <a href="{:url('/home/user/mypost',['state' => 2])}"
                        class="{$state === '2' ? 'layui-this' : ''}">精华</a>
                    <span class="fly-mid"></span>
                    <a href="{:url('/home/user/mypost',['state' => 3])}"
                        class="{$state === '3' ? 'layui-this' : ''}">热门</a>
                    <span class="fly-mid"></span>
                    <a href="{:url('/home/user/mypost',['state' => 0])}"
                        class="{$state === '0' ? 'layui-this' : ''}">常规</a>
                    <span class="fly-filter-right layui-hide-xs">
                        <a href="{:url('/home/user/mypost',['state' => $state,'accept' => '0'])}"
                            class="{$accept === '0' ? 'layui-this' : ''}">未采纳</a>
                        <span class="fly-mid"></span>
                        <a href="{:url('/home/user/mypost',['state' => $state,'accept' => '1'])}"
                            class="{$accept === '1' ? 'layui-this' : ''}">已采纳</a>
                    </span>
                </div>
                <ul class="fly-list">
                    {foreach $PostList as $item}
                    <li>
                        <a href="{:url('/home/user/index',['userid' => $item['user']['id']])}" class="fly-avatar">
                            <img src="{$item->user->avatar ? '/' . $item->user->avatar : 'static/home/res/images/avatar/default.png'}"
                                alt="贤心">
                        </a>
                        <h2>
                            <a class="layui-badge">{$item->type->name}</a>
                            <a href="{:url('/home/post/info',['postid' => $item['id']])}">{$item->title}</a>
                        </h2>
                        <div class="fly-list-info">
                            <a href="{:url('/home/user/index',['userid' => $item->user->id])}" link>
                                <cite>{$item->user->nickname}</cite>

                                {if $item->user->auth == 1}
                                <i class="iconfont icon-renzheng" title="认证信息：{$item->user->nickname}"></i>
                                {/if}

                                {if $item->user->vip > 0}
                                <i class="layui-badge fly-badge-vip">VIP {$item->user->vip}</i>
                                {/if}
                                <!--
					
					<i class="layui-badge fly-badge-vip">VIP3</i>
					-->
                            </a>
                            <span>{$item->createtime|date="Y-m-d"}</span>

                            <span class="fly-list-kiss layui-hide-xs" title="悬赏积分"><i class="iconfont icon-kiss"></i>
                                {$item->point}</span>
                            <!--<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>-->
                            <span class="fly-list-nums">
                                <i class="iconfont icon-pinglun1" title="回答"></i> {$item->comment_count}
                            </span>
                        </div>
                        <div class="fly-list-badge">
                            <!--<span class="layui-badge layui-bg-red">精帖</span>-->
                        </div>
                    </li>
                    {/foreach}
                </ul>
                <div style="text-align: center">
                    {$PostList|raw}
                </div>

            </div>
        </div>
    </div>

</div>
</body>
<html>